// map::insert
#include <iostream>
#include <map>
using namespace std;
#include "Mymap.h"
#include "Mymap_Spec.hpp"


int main ()
{

	Mymap<int,int> ty;
	int u=1,b=1;
	ty.insert(pair<int,int>(u,b));
	ty.insert(pair<int,int>(2,1));
	ty.insert(pair<int,int>(3,1));
	ty.insert(pair<int,int>(1,1));
	ty.insert(pair<int,int>(3,1));
	Mymap<int,int>::iterator it;
	cout << "mymap contains:\n";
	for ( it=ty.begin() ; it != ty.end(); it++ )
	    cout << (*it).first << " => " << (*it).second << endl;

	/*
  map<char,int> mymap;
  map<char,int>::iterator it;
  pair<map<char,int>::iterator,bool> ret;

  // first insert function version (single parameter):
  mymap.insert ( pair<char,int>('a',1) );
  mymap.insert ( pair<char,int>('z',1) );
  ret=mymap.insert (pair<char,int>('z',1) );
  if (ret.second==false)
  {
    ret.first->second++;
  }
  ret=mymap.insert (pair<char,int>('b',1) );
  if (ret.second==false)
  {
    ret.first->second++;
  }
  ret=mymap.insert (pair<char,int>('b',1) );
  if (ret.second==false)
  {
    ret.first->second++;
  }

  // second insert function version (with hint position):
  it=mymap.begin();
  mymap.insert (it, pair<char,int>('b',1));  // max efficiency inserting
  mymap.insert (it, pair<char,int>('c',1));  // no max efficiency inserting

  // third insert function version (range insertion):
  map<char,int> anothermap;
  anothermap.insert(mymap.begin(),mymap.find('c'));
*/
  // showing contents:


  return 0;
}
